#ifndef M0WIG_H
#define M0WIG_H

#include <QWidget>
#include <QPainter>
#include <QPixmap>
#include <QPushButton>
#include "mqtthandler.h"
#include <QDebug>
#include "globalval.h"
#include "mqtt/qmqtt.h"
#include <QWidget>
#include <QDebug>
#include <QJsonDocument>
#include <QJsonArray>
#include <QJsonObject>
#include <QByteArray>
#include <QDate>
#define QPushButton_STYTLE (QString("\
/*按钮普通态*/\
QPushButton\
{\
    font-family:Microsoft Yahei;\
    /*字体大小为20点*/\
   \
    /*字体颜色为白色*/\
   \
    /*背景颜色*/\
   \
    /*边框圆角半径为8像素*/\
    border-radius:8px;\
}\
/*按钮悬停态*/\
QPushButton:hover\
{\
    /*背景颜色*/\
    background-color:rgb(100 , 137 , 100);\
}\
/*按钮按下态*/\
QPushButton:pressed\
{\
    /*背景颜色*/\
    background-color:rgb(14 , 135 , 10);\
    /*左内边距为3像素，让按下时字向右移动3像素*/\
    padding-left:3px;\
    /*上内边距为3像素，让按下时字向下移动3像素*/\
    padding-top:3px;\
}"))

namespace Ui {
class M0Wig;
}
class M0Wig : public QWidget
{
    Q_OBJECT

public:
    explicit M0Wig(QWidget *parent = 0);
    ~M0Wig();
   bool zhao;
   bool feng;
   bool jing;
     bool men;
   QMQTT::Message message1;
private:
    Ui::M0Wig *ui;
    void paintEvent(QPaintEvent * event);
     QButtonGroup *group;
     GlobalVal glo;

private slots:
    void toggledSlot(int);
    void dataUpSlot(QByteArray message);
};

#endif // M0WIG_H
